home *** CD-ROM | disk | FTP | other *** search
- /*
- 独自メニューへのサイドワーク追加 ver. 0.002
- Copyright(C) 1993 Okome
- */
-
- #include <kkstr2.h>
- #include <sidework.h>
- #include <okome.h>
-
- extern char *MEN_title[];
- extern int MEN_kazu[], MEN_si, MEN_ss;
- extern void (*MEN_sdkexec)();
- char MEN_sna[30][28], MEN_skey[30];
-
- void MEN_sidein(int u)
- {
- int i, t=0;
- if ((MEN_ss = sdk_getNumProg())>0)
- {
- u += MEN_kazu[0];
- MEN_si = u;
- for (i=0; i<= MEN_kazu[0]; i++)
- {
- t += MEN_kazu[i];
- }
- for (i=t-1; i>=u; i--)
- {
- MEN_title[i+MEN_ss] = MEN_title[i];
- }
- MEN_kazu[1]+=MEN_ss;
- for (i=u; i<u+MEN_ss-1; i++)
- {
- sdk_getProgName(i-u+1, MEN_sna[i-u], MEN_skey+i-u);
- MEN_title[i] = MEN_sna[i-u];
- *(MEN_skey+i-u+1)=0;
- }
- MEN_title[i] = "#";
- MEN_sdkexec = MEN_sideexec;
- }
- }
-
- void MEN_sideexec(int i)
- {
- int k;
- KAN_getMode(&k);
- KAN_setMode(0x20000);
- sdk_exec(i);
- KAN_setMode(k);
- }
-